package com.bjtct.plugin.autogen.popup.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;

import com.bjtct.plugin.autogen.wizards.AutoGenWizard;

public class AutoGenPopAction implements IObjectActionDelegate {

	private Shell shell;
	
	/**
	 * Constructor for Action1.
	 */
	public AutoGenPopAction() {
		super();
	}
 
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
		shell = targetPart.getSite().getShell();
	}

	 
	public void run(IAction action) {
	 AutoGenWizard wizard = new AutoGenWizard();
	 WizardDialog dialog = new WizardDialog(shell,wizard);
	 dialog.open() ;
	}

	 
	public void selectionChanged(IAction action, ISelection selection) {
	}

}
